import { getCommonSetting } from "@/api/common.js";
import { init } from "@/composition/getData";
export default {
    namespaced: true,
    state: {
        commonData: {},
    },
    mutations: {
        setCommonData(state, newData) {
            state.commonData = newData;
        }
    },
    actions: {
        async asyncGetCommonData(context, state) {
            const data = await getCommonSetting();
            context.commit('setCommonData', data.data);
            init(data.data);
            return data;
        }
    }

}